package com.gtapps.base.dao;

import com.gtapps.user.entity.BaseUserUserEntity;

import java.util.List;

/**
 * @param <T> 泛型dao接口,SSH整合开发测试用
 * @author zbsilent
 * @date 2020-03-19
 * @Version 1.0.1
 */
public interface BaseDao<T> {

    public void add(T entity) throws Exception;

    public void delete(T entity) throws Exception;

    public void update(T entity) throws Exception;

    public List<T> findAll() throws Exception;

    public T findById(Integer id) throws Exception;

    /*
     * 得到从startIndex开始大小为pageSize的列表
     */
    public List<T> getPageList(int startIndex, int pageSize) throws Exception;

    /*
     * 得到总数
     */
    public long getAmount();


}
